using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI;

namespace Impact.Infrastructure.Plugins
{
    /// <summary>
    /// interface for administration of plugins - any plugin that needs administration
    /// above normal textboxes must implement this interface
    /// </summary>
    public interface IPluginAdmin
    {

        /// <summary>
        /// Get the control that allows editing of the given parameter.
        /// </summary>
        /// <example>
        /// category ID is an int, and is a foreign key to a category table.  in this instance,
        /// GetParameterEditControl would return a DropDownList that lists available categories to select
        /// </example>
        Control GetParameterEditControl(PluginParameter parameter);

        /// <summary>
        /// Given a control, retrieves a value and formats it as a string.
        /// </summary>
        /// <example>
        /// For example, if control is a DropDownList, this method would return SelectedValue
        /// </example>
        string GetControlValue(Control control);

    }
}
